import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/home/Home.vue'
import Layout from '../layout/Layout.vue'

Vue.use(VueRouter)

const routes = [
  {path:'/',
  redirect:'/layout/home'
  },
  {
    path: '/layout',
    name: 'Layout',
    component: Layout,
    children:[
      {
        path:'home',
        name:'Home',
        component:Home
        
      }
   

    ]
  },

]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
